home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-08-10 | 4.1 KB | 118 lines | [TEXT/MPS ] |
- (*
- File: Dictionary.mod
-
- Contains: Dictionary Manager Interfaces
-
- Version: Technology: System 7.5
- Package: Universal Interfaces 2.0 in “MPW Latest” on ETO #17
-
- Copyright: © 1984-1995 by Apple Computer, Inc.
- All rights reserved.
-
- Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- stack. Include the file and version information (from above)
- in the problem description and send to:
- Internet: apple.bugs.applelink.apple.com
- AppleLink: APPLE.BUGS
-
- *)
-
- (*$TAGS-*)
- (*$CALLING PASCAL*)
- MODULE Dictionary;
-
- IMPORT SYSTEM, Types, Files;
-
- (* $PUSH*)
- (* $ALIGN MAC68K*)
- (* $LibExport+*)
-
- CONST
- (* Dictionary data insertion modes *)
- kInsert* = 0; (* Only insert the input entry if there is nothing in the dictionary that matches the key. *)
- kReplace* = 1; (* Only replace the entries which match the key with the input entry. *)
- kInsertOrReplace* = 2; (* Insert the entry if there is nothing in the dictionary which matches the key.
- If there is already matched entries, replace the existing matched entries with the input entry. *)
-
- (* This Was InsertMode *)
-
- TYPE
- DictionaryDataInsertMode* = INTEGER;
-
-
- CONST
- (* Key attribute constants *)
- kIsCaseSensitive* = $10; (* case sensitive* = 16 *)
- kIsNotDiacriticalSensitive* = $20; (* diac not sensitive* = 32 *)
-
- (* Registered attribute type constants. *)
- kNoun* = -1;
- kVerb* = -2;
- kAdjective* = -3;
- kAdverb* = -4;
-
- (* This Was AttributeType *)
-
- TYPE
- DictionaryEntryAttribute* = Types.SInt8;
-
- (* Dictionary information record *)
- DictionaryInformation* = RECORD
- dictionaryFSSpec*: Files.FSSpec;
- numberOfRecords*: Types.SInt32;
- currentGarbageSize*: Types.SInt32;
- script*: Types.ScriptCode;
- maximumKeyLength*: Types.SInt16;
- keyAttributes*: Types.SInt8;
- END;
-
- DictionaryAttributeTable* = (*ΔΔPACKEDΔΔ*) RECORD
- datSize*: Types.UInt8;
- datTable*: (*ΔΔPACKEDΔΔ*) ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF DictionaryEntryAttribute;
- END;
-
- DictionaryAttributeTablePtr* = POINTER TO DictionaryAttributeTable;
-
-
- PROCEDURE InitializeDictionary*((*CONST*)VAR theFsspecPtr: Files.FSSpec; maximumKeyLength: Types.SInt16; keyAttributes: Types.ByteParameter; script: Types.ScriptCode): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0500, $AA53;
- (*$END*)
- PROCEDURE OpenDictionary*((*CONST*)VAR theFsspecPtr: Files.FSSpec; accessPermission: Types.ByteParameter; VAR dictionaryReference: Types.SInt32): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0501, $AA53;
- (*$END*)
- PROCEDURE CloseDictionary*(dictionaryReference: Types.SInt32): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0202, $AA53;
- (*$END*)
- PROCEDURE InsertRecordToDictionary*(dictionaryReference: Types.SInt32; key: Types.ConstStr255Param; recordDataHandle: Types.Handle; whichMode: DictionaryDataInsertMode): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0703, $AA53;
- (*$END*)
- PROCEDURE DeleteRecordFromDictionary*(dictionaryReference: Types.SInt32; key: Types.ConstStr255Param): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0404, $AA53;
- (*$END*)
- PROCEDURE FindRecordInDictionary*(dictionaryReference: Types.SInt32; key: Types.ConstStr255Param; requestedAttributeTablePointer: DictionaryAttributeTablePtr; recordDataHandle: Types.Handle): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0805, $AA53;
- (*$END*)
- PROCEDURE FindRecordByIndexInDictionary*(dictionaryReference: Types.SInt32; recordIndex: Types.SInt32; requestedAttributeTablePointer: DictionaryAttributeTablePtr; VAR recordKey: Types.Str255; recordDataHandle: Types.Handle): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0A06, $AA53;
- (*$END*)
- PROCEDURE GetDictionaryInformation*(dictionaryReference: Types.SInt32; VAR theDictionaryInformation: DictionaryInformation): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0407, $AA53;
- (*$END*)
- PROCEDURE CompactDictionary*(dictionaryReference: Types.SInt32): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0208, $AA53;
- (*$END*)
-
- (* $ALIGN RESET*)
- (* $POP*)
-
- END Dictionary.
-